#ifndef DOWNLOADIMAGE_H
#define DOWNLOADIMAGE_H
#include<QNetworkAccessManager>
#include <QWidget>

namespace Ui {
class DownloadImage;
}

class DownloadImage : public QWidget
{
    Q_OBJECT

public:
    explicit DownloadImage(QWidget *parent = nullptr);
    ~DownloadImage();
    void startDownload(QString url,QString localPathImage);//localPathImage是本地的图片路径及其名字
    bool isSuccess=false;

    QByteArray InitGetRequest(QString url, QString obj);

private:
//    Ui::DownloadImage *ui;
    QNetworkAccessManager *networkAccessManager;
    QString localPathImage;


};

#endif // DOWNLOADIMAGE_H
